package com.ella.controller;
import com.ella.entity.Result;
import com.ella.entity.SysRole;
import com.ella.service.ISysRoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 角色信息表 前端控制器
 * </p>
 *
 * @author 浮生若梦
 * @since 2023-05-08
 */
@RestController
@RequestMapping("/sys-role")
public class SysRoleController {

	@Resource
	private ISysRoleService sysRoleService;

	@GetMapping("/list")
	public Result getRoles(){
		List<SysRole> list = sysRoleService.list();
		System.out.println(list);
		return Result.ok().put("data",list);
	}

}
